package org.beanscreator.parsers;

public class ParserFactory {

    private static Parser dom = new MyDOMParser();
    private static Parser sax = null;
    private static Parser stax = null;

    private ParserFactory() {
    }

    public static Parser getParser(ParserTypes type) {

        switch (type) {
            case DOM:
                return dom;
            case SAX:
                return sax;
            case STAX:
                return stax;
            default:
                return dom;
        }
    }

}
